<template>
  <div style="text-align: center">
    <img :src="url">
  </div>
</template>
<script>
import {postAction} from '../../../api/request'
import pic_no_workflow from '@/assets/images/noWorkflowImg.png'

export default {
  name: 'application-image',
  data() {
    return {
      processInstanceId: '',
      key: '',
      url: '',
    }
  },
  methods: {
    async edit(record, key) {
      //let processinstid = record.processinstid;
      let url = '/api/ac/subsistence/ss00000Service/checkWorkflowImageType'
      let dataParam = {}
      dataParam.processInstanceId = record.processinstid;
      let imgUrl = "";
      await postAction(url, dataParam).then((res) => {
        if (res.data.errcode == 0 && res.data.data != '') {
          imgUrl = res.data.data
        }
      })
      if (imgUrl == 'HistoricalData' || imgUrl == '') {
        this.url = pic_no_workflow;
      } else {
        this.url = imgUrl;
      }
    }
  }
}
</script>

<style scoped>

</style>
